package org.yray.sip.rtp.receive;

import org.yray.sip.factory.IdRuleComponent;
import org.yray.sip.factory.SipServerFactory;
import org.yray.sip.factory.inet.IByeFactory;
import org.yray.sip.factory.inet.ISipEventFactory;
import org.yray.sip.factory.inet.IStopWatchFactory;
import org.yray.sip.factory.inet.SipComponent;
import org.yray.sip.log.AbstractLog;
import org.yray.sip.rtp.sender.RtcpSender;
import org.yray.sip.server.SipServerHandler;
import org.yray.sip.utils.IcspBeanHolder;
import org.yray.sip.visit.SipVisitorFactory;

public abstract class AbstractBeanHolder extends AbstractLog {


    public SipServerHandler getSipServerHandler(String id)
    {
        return IcspBeanHolder.getBean(SipServerFactory.class)
                .getSipServerHandler(id);
    }

    public  SipComponent getSipService()
    {
        return IcspBeanHolder.getBean(SipComponent.class);
    }
    public RtcpSender getRtcpSender()
    {
        return IcspBeanHolder.getBean(RtcpSender.class);
    }



    public ISipEventFactory getEventFactory()
    {
        return IcspBeanHolder.getBean(ISipEventFactory.class);
    }

    public IByeFactory getByeFactory()
    {
        return IcspBeanHolder.getBean(IByeFactory.class);
    }


    public SipVisitorFactory getSipVisitorFactory()
    {

        return IcspBeanHolder.getBean(SipVisitorFactory.class);
    }

    public IdRuleComponent getIdRuleComponent()
    {
        return IcspBeanHolder.getBean(IdRuleComponent.class);
    }

    public IStopWatchFactory getStopWatchFactory()
    {
        return IcspBeanHolder.getBean(IStopWatchFactory.class);
    }
}
